package business.global.room.base;

import business.shareplayer.ShareNode;
import cenum.ChatType;
import cenum.ClassType;
import jsproto.c2s.cclass.BaseSendMsg;
import jsproto.c2s.cclass.room.BaseCreateRoom;
import jsproto.c2s.cclass.room.BaseRoomConfigure;
import jsproto.c2s.cclass.room.GetRoomInfo;
import jsproto.c2s.cclass.room.RoomPosInfo;
import jsproto.c2s.iclass.room.SBase_Dissolve;
import jsproto.c2s.iclass.room.SBase_PosLeave;
import lombok.Data;

import java.util.List;
import java.util.Map;
import java.util.Random;

public class RobotRoom extends AbsBaseRoom{
    private long endTime;
    final Random random = new Random();
    private long roomId;
    /**
     * 构成函数
     *
     * @param baseRoomConfigure 公共配置
     * @param roomKey           房间key
     * @param ownerID           房主ID
     */
    public RobotRoom(BaseRoomConfigure baseRoomConfigure, String roomKey, long ownerID) {
        super(baseRoomConfigure, roomKey, ownerID);
        roomId = random.nextLong();
    }

    @Override
    public void initGameRoomBO() {

    }

    @Override
    public void startGameBase() {

    }

    @Override
    public long getRoomID() {
        return roomId;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }

    @Override
    public boolean autoStartGame() {
        return false;
    }

    @Override
    public boolean autoReadyGame() {
        return false;
    }

    @Override
    public String dataJsonCfg() {
        return null;
    }

    @Override
    public AbsRoomPosMgr initRoomPosMgr() {
        return new RobotRoomPosMgr(this);
    }

    @Override
    public void initCreatePos() {

    }

    @Override
    public boolean enterRoomOtherCondition(long pid) {
        return true;
    }

    @Override
    public boolean startGameOtherCondition(long pid) {
        return true;
    }

    @Override
    public boolean exitRoomOtherCondition(long pid) {
        return true;
    }

    @Override
    protected void continueRoom() {

    }

    @Override
    public boolean isMidwayDisbandmentPreservation() {
        return false;
    }

    @Override
    public void startNewSet() {

    }

    @Override
    public void clearEndRoom() {

    }

    @Override
    public int getTimerTime() {
        return 0;
    }

    @Override
    public int getPlayingCount() {
        return 0;
    }

    @Override
    public boolean godCardMsg(String msg, long pid) {
        return false;
    }

    @Override
    public BaseSendMsg Trusteeship(long roomID, long pid, int pos, boolean trusteeship) {
        return null;
    }

    @Override
    public BaseSendMsg PosLeave(SBase_PosLeave posLeave) {
        return null;
    }

    @Override
    public BaseSendMsg LostConnect(long roomID, long pid, boolean isLostConnect, boolean isShowLeave) {
        return null;
    }

    @Override
    public BaseSendMsg PosContinueGame(long roomID, int pos) {
        return null;
    }

    @Override
    public BaseSendMsg PosUpdate(long roomID, int pos, RoomPosInfo posInfo, int custom) {
        return null;
    }

    @Override
    public BaseSendMsg PosUpdate(long roomID, int pos, RoomPosInfo posInfo, int visit, RoomPosInfo visitInfo, int custom) {
        return null;
    }

    @Override
    public BaseSendMsg VisitUpdate(long roomID, int action, int pos, RoomPosInfo posInfo, int visit, RoomPosInfo visitInfo) {
        return null;
    }

    @Override
    public BaseSendMsg PosReadyChg(long roomID, int pos, boolean isReady) {
        return null;
    }


    @Override
    public BaseSendMsg Dissolve(SBase_Dissolve dissolve) {
        return Robot_Dissolve.make(dissolve);
    }

    @Override
    public BaseSendMsg StartVoteDissolve(long roomID, int createPos, int endSec) {
        return null;
    }

    @Override
    public BaseSendMsg PosDealVote(long roomID, int pos, boolean agreeDissolve, int endSec) {
        return null;
    }

    @Override
    public BaseSendMsg Voice(long roomID, int pos, String url) {
        return null;
    }

    @Override
    public BaseSendMsg XiPai(long roomID, long pid, ClassType cType) {
        return null;
    }

    @Override
    public BaseSendMsg ChatMessage(long pid, String name, String content, ChatType type, long toCId, int quickID) {
        return null;
    }

    @Override
    public <T> BaseSendMsg RoomRecord(List<T> records) {
        return null;
    }

    @Override
    public BaseSendMsg ChangePlayerNum(long roomID, int createPos, int endSec, int playerNum) {
        return null;
    }

    @Override
    public BaseSendMsg ChangePlayerNumAgree(long roomID, int pos, boolean agreeChange) {
        return null;
    }

    @Override
    public BaseSendMsg ChangeRoomNum(long roomID, String roomKey, int createType) {
        return null;
    }

    @Override
    public GetRoomInfo getRoomInfo(long pid) {
        return null;
    }

    @Override
    public BaseCreateRoom getRoomCfg() {
        return null;
    }

    @Override
    public void setEndRoom() {

    }

    @Override
    public void calcEnd() {

    }

    @Override
    public void RobotDeal(int pos) {

    }

    @Override
    public void roomTrusteeship(int pos) {

    }

    @Override
    public long getTrusteeshipUpdateTime() {
        return 0;
    }

    @Override
    public void cancelTrusteeship(AbsRoomPos pos) {

    }

    @Override
    public void startTrusteeShipTime() {

    }

    @Override
    public boolean isCanChangePlayerNum() {
        return false;
    }

    @Override
    public <T> T getCfg() {
        return null;
    }

    @Override
    public boolean checkExistAllEmpty() {
        return false;
    }
}
